package com.qf.mapper;

import com.qf.pojo.SysCategory;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * created by 赵文韬 on 2022/3/18 19:15
 */
public interface SysCategoryMapper {
    @Insert("insert into sys_category (category_name,tx_command,rx_command,command_name,create_by,create_time) values(#{categoryName},#{txCommand},#{rxCommand},#{commandName},#{createBy},#{createTime})")
    void addSysCategory(SysCategory sysCategory);
    @Select("SELECT * FROM sys_category WHERE c_id=#{id}")
    SysCategory findById(Long id);
    @Select("SELECT * FROM sys_category")
    List<SysCategory> findAll();
    int update(SysCategory sysCategory);
    int delete(@Param("cids") List<Long> cids);
    /*int deleteByIds(@Param("ids") List<Long> ids);*/
}
